<template>
    <a-tooltip placement="bottom">
        <template #title>
            <span>退出登录</span>
        </template>
        <a-button type="text" @click="Logout" :icon="Icon" />
    </a-tooltip>
</template>

<script setup>
import { UseUserStore } from '../User'
import { h } from 'vue'
import { useRouter } from "vue-router"
const router = useRouter();
const User = UseUserStore();

const Icon = h('span', { class: 'iconfont icon-tuichudenglu' })

const Logout = function (params) {
    User.Logout();
    router.push('/login');
}

</script>

<style lang="less" scoped></style>